// dlg.txt

//	mark_quest_dest(zone,x,y,layer,quest);
//	cancel_out_fight(0,short kill_enc)
//	make_outdoor_enc(short x,short y,short which_enc);
//	set_out_fight_field(short which_field);

begintalkscript;

variables;

short this_sec = 71;

begintalknode;
	tag = 1;
	condition = get_sdf(100 + this_sec,1) == 0;
	text1 = "You are getting close to the western border of the Rokaj. The road leads into a long stretch of wilderness. Eventually, it goes to the Achaemin, a small nation on the southern coast and another of Haven's vassals.";
	text2 = "You know blissfully little about the Achaemin. Maybe it has lots of problems. But they aren't your problems.";
	text3 = "There is a tower along the road. Haven builds forts on the borders between its vassals, to provide safety for travelers and a good place to collect taxes. Not surprisingly, the tower looks run-down and neglected.";
	code =
		sf(100 + this_sec,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(100 + this_sec,2) == 0;
	text1 = "There is a group of filthy, armed people sitting around the fire in this grove. There is the wreckage of a wagon nearby. These people have looted everything out of it and are now arguing about the loot.";
	text2 = "They look like road brigands. Haven's generally pretty good at keeping such scum out of their lands, but your Empire has been lax in the Rokaj. Before you can attempt to arrest them properly, they grab their weapons.";
	code =
		sf(100 + this_sec,2,1);
		make_outdoor_enc(74,372,0);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(100 + this_sec,3) == 0;
	text1 = "You find another group of brigands. They have another wagon. They were wise and patient enough to haul their loot farther back into the forest before they started squabbling over the contents.";
	text2 = "Their looks of surprise when they see you are highly satisfying.";
	code =
		sf(100 + this_sec,3,1);
		make_outdoor_enc(83,369,0);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(100 + this_sec,4) == 0;
	text1 = "You walk along a narrow track through the woods. There are faint tracks in the mud. Small groups of booted humans have been walking up and down this remote path.";
	text2 = "A wind blows through the woods. You hear the loud creaking of wood. You feel like you're being watched. If anyone is hiding back here, they may already be alerted to your presence.";
	code =
		sf(100 + this_sec,4,1);
		sf(171,11,2);
		set_terrain(0,73,377,118);
		set_terrain(0,73,378,118);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(100 + this_sec,5) == 0 && get_ran(1,0,100) < 50;
	text1 = "You hear a horrifying screech. It is raspy, anguished, and goes on for about ten seconds.";
	text2 = "Maybe it was a human, maybe an animal. You think it came from the east.";
	code =
		sf(100 + this_sec,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(100 + this_sec,6) == 0;
	text1 = "At last, you find the cache for this brigand clan. They hid all of their best loot back here. You find coins, a nice suit of chainmail, and a scroll.";
	code =
		sf(100 + this_sec,6,1);
		change_coins(160,TRUE);
		reward_give(214);
		change_crafting(0,1,0,0,0);
		
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(100 + this_sec,7) == 0;
	text1 = "There is a row of farms along the road near the Achaemin border. Each is owned by its own farm. They seem content and prosperous.";
	text2 = "They don't want to talk to you, though. Your reputation in this region is not very good.";
	text3 = "They greet you and invite you in for tea and a meal. They have heard good things about you.";
	code =
		sf(100 + this_sec,7,1);
		if (gf(80,16) < 105)
			rs(3);
			else rs(2);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(100 + this_sec,8) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(100 + this_sec,9) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(100 + this_sec,10) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(100 + this_sec,11) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(100 + this_sec,12) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "You search the camp for treasure, but you find nothing of value. This little portion of the brigand clan was given the least valuable wagon to root through.";

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "You search the brigand camp. These robbers managed to claim a portion of the loot with some coins and cheap jewelry. Decent trading goods. You claim it.";
	code =
		change_coins(25,TRUE);
	break;

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "At last, you have found the main force of the brigand clan in this forest. They knew you were coming. However, they aren't prepared for an ambush. Instead, they are kneeling. A druid stands before them, murmuring an incantation.";
	text2 = "When they rise to face you, they look crazed with rage. Somehow, they have been elevated to a state of berserk rage. They scream and charge!";
	code =
		set_out_fight_field(8);
	break;
		
begintalknode;
	tag = 16;
	condition = 1;
	text1 = "At last, the brigands in this forest have been eliminated. You search their camp. You find no treasure. There is a perplexing lack of wealth. You also find their clan banner, trampled into the mud in the skirmish. An appropriate end.";
	text2 = "Haven tries to treat the clans of the Rokaj with great respect, but only when they obey the law. These rogues took advantage of your inattention to do harm, but none can hide from Haven's justice for long.";
	code =
		sf(171,11,1);
		sf(171,13,1);
	break;
	
begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You meet a band of Kranas warriors. They are decently armed and very young. They aren't hostile, but they're extremely nervous. They march up and down the road as if they're unsure where they want to go.";

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Stop them.";
	text1 = "You block their path. They don't object. They just stand sullenly in a clump in front of you. They look down at the ground like sullen teenagers. Which they actually are.";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = gf(80,16) < 110;
	question = "_What are you doing here?_";
	text1 = "They look at each other nervously. There is some whispering. You suspect that they have heard of you, but they don't like what they've heard.";
	text2 = "Finally, one of them says, _We're hunting._ They aren't doing anything wrong, so letting them go seems the best choice.";
	action = END_TALK;
	
begintalknode;
	state = 11;
	nextstate = 12;
	condition = gf(80,16) >= 110;
	question = "_What are you doing here?_";
	text1 = "They look at each other nervously. There is some whispering. You suspect that they have heard good things about you. They trust you a little.";
	text2 = "Finally, one of them says, _We're proving ourselves. We're going to the Achaemin. To raid._";
	action = END_TALK;

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_That is illegal._";
	text1 = "They look confused. _But we thought you understood the ways of the Ro. We need to prove ourselves. We have to raid something!_";

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_And what are you raiding for, exactly?_";
	text1 = "One of them laughs. _We have to steal something to prove ourselves. Anything. Just a bag of grain, something like that. The danger is the important thing._";

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_You're lucky I don't have you executed on the spot._";
	text1 = "They sullenly turn and head home, grumbling about you as they go. You suspect that news of this encounter will spread. At least there is less raiding now.";
	action = END_TALK;
	code =
		cancel_out_fight(0,1);
		violence(2);
		ro_faction(-2);
		queen_faction(2);
	break;

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_You need to go home now._";
	text1 = "They sullenly turn and head home, grumbling about you as they go. You suspect that news of this encounter will spread. At least there is less raiding now.";
	action = END_TALK;
	code =
		cancel_out_fight(0,1);
		ro_faction(-2);
		queen_faction(2);
	break;

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_Move on. I didn't see you._";
	text1 = "They are pleasantly surprised. Reassured by this encounter, they head south to the Achaemin. You suspect that news of this encounter will spread, if they live.";
	action = END_TALK;
	code =
		cancel_out_fight(0,1);
		ro_faction(1);
		queen_faction(-2);
	break;
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Let them go.";
	text1 = "They walk by you, relieved. They don't seem any more decisive about where they want to go.";
	action = END_TALK;

//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				